package com.ldzy.pojo;

public class Bean2 {
   private String name;
   private  Bean1 bean1;

    public Bean2() {
        System.out.println("我是构造方法实例化");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Bean1 getBean1() {
        return bean1;
    }

    public void setBean1(Bean1 bean1) {
        this.bean1 = bean1;
    }

    @Override
    public String toString() {
        return "Bean2{" +
                "name='" + name + '\'' +
                ", bean1=" + bean1 +
                '}';
    }
}
